home *** CD-ROM | disk | FTP | other *** search
- on(release){
- if(!isNaN(Mytext))
- {
- call(_root.DisplayMe(Mytext));
- }
- if(MyText == "." and _root.MyDot == false)
- {
- call(_root.DisplayMe(Mytext));
- _root.MyDot = true;
- }
- if(IsNaN(MyText))
- {
- if(MyText == "=")
- {
- call(_root.Operation());
- }
- if(MyText == "+")
- {
- call(_root.Operation("+"));
- }
- if(MyText == "-")
- {
- call(_root.Operation("-"));
- }
- if(MyText == "/")
- {
- call(_root.Operation("/"));
- }
- if(MyText == "*")
- {
- call(_root.Operation("*"));
- }
- if(MyText == "M+")
- {
- _root.memory += Number(_root.display);
- }
- if(MyText == "MRC")
- {
- _root.display = _root.memory;
- _root.memory = 0;
- _root.clear = true;
- }
- if(MyText == "C")
- {
- _root.display = "0";
- _root.MyDot = false;
- }
- if(MyText == "CE")
- {
- _root.operand1 = false;
- _root.display = "0";
- _root.operator = "";
- _root.clear = false;
- _root.MyDot = false;
- }
- if(MyText == "PI")
- {
- _root.display = "3.14159265";
- _root.Clear = true;
- }
- if(MyText == "1/X")
- {
- _root.display = Number(_root.display / 2);
- _root.Clear = true;
- }
- if(MyText == "X^2")
- {
- _root.display = Number(_root.display * _root.display);
- _root.Clear = true;
- }
- if(MyText == "X^3")
- {
- _root.display = Number(_root.display * _root.display * _root.display);
- _root.Clear = true;
- }
- if(MyText == "sqrt")
- {
- _root.display = Math.sqrt(_root.display);
- _root.Clear = true;
- }
- if(MyText == "E")
- {
- _root.display = 2.718281828459045;
- _root.Clear = true;
- }
- if(MyText == "pow")
- {
- call(_root.Operation("pow"));
- }
- if(MyText == "max")
- {
- _root.display = 1.7976931348623157e+308;
- _root.Clear = true;
- }
- }
- }
-